﻿using System;
using System.Collections.Generic;
using WiMo.Games.Menus;
using WiMo.Games.Inputs;

namespace WiMo.Games.StandardMenus
{
    public class MenuManager : IMenuManager
    {
        private List<IMenuComponent> _menus;
        IGameEngine _gameEngine;
        public MenuManager(IGameEngine engine)
        {
            _gameEngine = engine;
            _menus = new List<IMenuComponent>();
        }

        public IMenuComponent Create(string title)
        {
            var menuComponent = new MenuComponent(_gameEngine);
            menuComponent.Title = title;
            _menus.Add(menuComponent);

            return menuComponent;
        }

        public IMenuComponent Create()
        {
            var menuComponent = new MenuComponent(_gameEngine);
            _menus.Add(menuComponent);

            return menuComponent;
        }
    }
}
